import java.util.Scanner;

/**
 * @author: gao
 * @create-date: 2025/5/30 20:11
 */

public class Main {
    public static void main(String[] args) {
        Base base = new Sub();
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int x = scanner.nextInt();
            int y = scanner.nextInt();
            base.setX(x);
            base.setY(y);
            System.out.println(base.calculate());
        }
    }
}

abstract class Base {
    private int x;
    private int y;

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int calculate() {
        if (avg() == 0) {
            return 0;
        } else {
            return sum() / avg();
        }
    }

    public abstract int sum();
    public abstract int avg();
}

class Sub extends Base {

    @Override
    public int sum() {
        return getX() + getY();
    }

    @Override
    public int avg() {
        return (getX() + getY()) / 2;
    }
}